package com.interceptor;

import com.hsc.mvc.Interceptor;
import com.hsc.mvc.annotations.InterceptorAspect;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author
 * @date 2025-05-20
 * @Description
 */
@InterceptorAspect(include = "/test1.do,/test2.do,/test3.do", exclude = "/test4.do")
public class MyInterceptor2 implements Interceptor {

    @Override
    public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) {
        System.out.println("MyInterceptor2使用注解实现的拦截器");
        return true;

    }

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object target) {
        System.out.println("MyInterceptor2postHandle");

    }
}
